/*
* Copyright (c) 2021, 深圳市光丽海科技有限公司
* All rights reserved.
*
* 文件名称: app_user_config.h
* 文件标识：
* 摘 要：
*   应用层通用配置文件
* 当前版本：V1.0
* 作 者： raoxiongjian
* 完成日期: 2021年6月21日
*/
#ifdef  __cplusplus
extern "C" {
#endif


//#define SUPPORT_WD          //是否支持看门狗
//#define SUPPORT_UART        //是否支持串口
//#define SUPPORT_FLASH       //是否支持FLASH
//#define SUPPORT_RF433
//#define SUPPORT_DM          //支持DM模块

#define SUPPORT_PWM
//#define SUPPORT_FLASH
//#define SUPPORT_IR
//#define SUPPORT_KEY

//#define SUPPORT_UART
//#define SUPPORT_MIC
//#define SURPORT_TUYA
//
#define H_MAX                    360
#define S_MAX                    100
#define V_MAX                    100
#define COLOUR_MAX               255

#define ON                       1
#define OFF                      0

#define XDATA

#define BN_MAX                   255

#define enableIrq()                 GLOBAL_INT_RESTORE()           	//开总中断
#define disableIrq()               	GLOBAL_INT_DISABLE() 			//关闭总中断


/******************************PWM FRQ DEFINE********************************/
#define PWM_FRQ_NA							(0x00)
#define PWM_FRQ_250HZ						(64000)				//16BIT
#define PWM_FRQ_500HZ						(32000)				//15BIT
#define PWM_FRQ_580HZ						(27586)				//15BIT
#define PWM_FRQ_1KHZ						(16000)				//14BIT
#define PWM_FRQ_2KHZ						(PWM_FRQ_1KHZ>>1)
#define PWM_FRQ_3KHZ						(PWM_FRQ_1KHZ/3)
#define PWM_FRQ_4KHZ						(PWM_FRQ_1KHZ>>2)
#define PWM_FRQ_5KHZ						(PWM_FRQ_1KHZ/5)
#define PWM_FRQ_8KHZ						(PWM_FRQ_1KHZ>>3)
#define PWM_FRQ_16KHZ						(PWM_FRQ_1KHZ>>4)
#define PWM_FRQ_20KHZ						(PWM_FRQ_1KHZ/20)	//10BIT,800

/*********************************    PWM    ********************************/
#define PWM_FRQ_SELECTION							PWM_FRQ_1KHZ

//#define PWM_CHANNEL_C					        E_PWM_CH		
#define PWM_CHANNEL_W					        E_PWM_CH5		
#define PWM_CHANNEL_R					        E_PWM_CH0		
#define PWM_CHANNEL_G					        E_PWM_CH1		
#define PWM_CHANNEL_B					        E_PWM_CH4

/*********************************    ADV    ********************************/
#define SEND_BEACON_INTERVAL							(20)//20ms
#define SEND_BEACON_CHANNEL								ADV_CHANNEL_BIT_37




#ifdef  __cplusplus
}
#endif

